package com.sinosoft.ebusiness.domain.elementManage;
// 采用工具 Hibernate Tools 3.2.4.GA (sinosoft version) 生成，请勿手工修改。

import java.util.ArrayList;
import java.util.List;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.OrderBy;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.sinosoft.ebusiness.domain.elementManage.GeProductStep;
import com.sinosoft.ebusiness.domain.elementManage.GeProductStepId;
import com.sinosoft.ebusiness.domain.elementManage.GeProductTemplateViewgroup;
import com.sinosoft.ebusiness.domain.elementManage.GeTemplate;

/**
 * POJO类GeProductStepTemplate
 */
@Entity
@Table(name = "GE_PRODUCT_STEP_TEMPLATE")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class GeProductStepTemplate implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2228145050511394198L;

	/** 属性ID */
	private GeProductStepId id;

	/** 属性geProductStep */
	private GeProductStep geProductStep;

	/** 属性geTemplate */
	private GeTemplate geTemplate;

	/** 页面提交函数 属性submitfunction */
	private String submitfunction;
	
	/**	页面初始化函数方法名	**/
	private String funName;
	
	/**	页面初始化函数方法体	**/
	private String funBody;
	
	/** 属性geProductSteps */
	private List<GeProductTemplateViewgroup> geProductTemplateViewgroups = new ArrayList<GeProductTemplateViewgroup>(0); 

	/**
	 * 类GeProductStepTemplate的默认构造方法
	 */
	public GeProductStepTemplate() {
	}

	/**
	 * 属性ID的getter方法
	 */
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "processcode", column = @Column(name = "PROCESSCODE")),
			@AttributeOverride(name = "productcode", column = @Column(name = "PRODUCTCODE")),
			@AttributeOverride(name = "version", column = @Column(name = "VERSION")) })
	public GeProductStepId getId() {
		return this.id;
	}

	/**
	 * 属性ID的setter方法
	 */
	public void setId(GeProductStepId id) {
		this.id = id;
	}

	/**
	 * 属性geProductStep的getter方法
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public GeProductStep getGeProductStep() {
		return this.geProductStep;
	}

	/**
	 * 属性geProductStep的setter方法
	 */
	public void setGeProductStep(GeProductStep geProductStep) {
		this.geProductStep = geProductStep;
	}

	/**
	 * 属性geTemplate的getter方法
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TEMPLATECODE", nullable = false)
	@JSONField(serialize=false)
	@JsonBackReference
	public GeTemplate getGeTemplate() {
		return this.geTemplate;
	}

	/**
	 * 属性geTemplate的setter方法
	 */
	public void setGeTemplate(GeTemplate geTemplate) {
		this.geTemplate = geTemplate;
	}

	/**
	 * 属性submitfunction的getter方法
	 */

	@Column(name = "SUBMITFUNCTION")
	public String getSubmitfunction() {
		return this.submitfunction;
	}

	/**
	 * 属性submitfunction的setter方法
	 */
	public void setSubmitfunction(String submitfunction) {
		this.submitfunction = submitfunction;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "geProductStepTemplate")
	@OrderBy(clause="orderNo")
	public List<GeProductTemplateViewgroup> getGeProductTemplateViewgroups() {
		return geProductTemplateViewgroups;
	}

	public void setGeProductTemplateViewgroups(
			List<GeProductTemplateViewgroup> geProductTemplateViewgroups) {
		this.geProductTemplateViewgroups = geProductTemplateViewgroups;
	}

	@Column(name = "FUNNAME")
	public String getFunName() {
		return funName;
	}

	public void setFunName(String funName) {
		this.funName = funName;
	}

	@Column(name = "FUNBODY")
	public String getFunBody() {
		return funBody;
	}

	public void setFunBody(String funBody) {
		this.funBody = funBody;
	}
}
